<template>
	<div>
		<el-tabs v-model="activeName" @tab-click="handleClick">
		    <el-tab-pane label="添加预定" name="first">
				<SeatShow ref="SeatShowRef"></SeatShow>
			</el-tab-pane>
		    <el-tab-pane label="预定列表" name="second">
				<ReserveList ref="ReserveListRef"></ReserveList>
			</el-tab-pane>
		  </el-tabs>
		
	</div>
</template>

<script>
	import SeatShow from './SeatShow.vue'
	import ReserveList from './tstorereservedesk.vue'
	export default{
		components:{
			SeatShow,
			ReserveList
		},
		
		data(){
			return{
				activeName:'first'
			}
		},
		methods:{
			handleClick(tab, event){
				if(tab.name === 'first'){
					this.$refs.SeatShowRef.getDataList()
				}
				if(tab.name === 'second'){
					this.$refs.ReserveListRef.getDataList()
				}
			}
		}
	}
</script>

<style>
</style>
